// 导入cookies包
import Cookies from 'js-cookie'
// 定义token键
const TokenKey = 'vue_admin_template_token'
// 定义时间戳键
const Timekey = 'vue_admin_template_time'
// 获取时间戳
export function getTime () {
  return Cookies.get(Timekey)
}
// 设置时间戳
export function setTime () {
  return Cookies.set(Timekey, Date.now())
}
// 获取token
export function getToken () {
  return Cookies.get(TokenKey)
}
// 设置token
export function setToken (token) {
  return Cookies.set(TokenKey, token)
}
// 移除token
export function removeToken () {
  return Cookies.remove(TokenKey)
}
